package org.finesys.common.tenant.properties;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

@Data
@ConfigurationProperties(prefix = "fine.tenant")
public class TenantProperties {
    /**
     * 多租户是否开启
     */
    private Boolean enable = true;
    /**
     * 租户列名称
     */
    private String column = "tenant_id";

    /**
     * 忽略携带tenant-id的请求头
     */
    private Set<String> ignoreUrls = new HashSet<>(Arrays.asList("/actuator/**", "/error", "/v3/api-docs"));

    /**
     * 开启多租户的表
     * <p>
     * 添加需要开启多租户功能的表
     */
    private Set<String> tables = Collections.EMPTY_SET;
}
